<template>
<div class="list">
   <div class="items">
    <img :src="movie.img |formatImg('64.90')" alt />
    <div class="content">
      <div>
        <h3>
            {{movie.nm}}
            <span class="version" :class="movie.version"></span>
        </h3>
        <p>评分:{{movie.sc}}</p>
        <p>主演:{{movie.star}}</p>
        <p>{{movie.showInfo}}</p>
      </div>
      <div @click="$router.push({name:'detail',params:movie})">
        <button v-show="movie.globalReleased">购票</button>
        <button v-show="!movie.globalReleased">预售</button>
      </div>
    </div>
  </div>
</div>
 
</template>

<script>
export default {
  props: ['movie'],
};
</script>
<style lang="scss" scoped>
@import "../../../assets/style/mixin.scss";
.items {
  display: flex;
  margin-top: 20px;
  @include border1px(#666);
  &::after {
    bottom: -10px;
  }
  img {
    width: 64px;
    height: 90px;
    border-radius: 8px;
  }
  .content {
    display: flex;
    width: 300px;
    div:first-child {
      flex: 1;
      margin-left: 8px;
    //   width: 230px;
      p {
        font-weight: 300;
        text-overflow: ellipsis;
        white-space: nowrap;
        overflow: hidden;
        width: 203px;
      }
    }
    div:last-child {
      display: flex;
      width: 60px;
      justify-content: center;
      align-items: center;
      button:first-child{
        width: 47px;
        height: 27px;
        border-radius: 12px;
        font-size: 13px;
        border: none;
        margin-top: 26px;
        background-color: red;
        color: white;
      }
      button:last-child{
           width: 47px;
        height: 27px;
        border-radius: 12px;
        font-size: 13px;
        border: none;
        margin-top: 26px;
        background-color: #33bfff;
        color: white;
      }
    }
  }
}

.version {
  width: 43px;
  height: 14px;
  background-size: cover;
  display: inline-block;
}

.version.v2d.imax {
  width: 43px;
  background-image: url();
}

.version.v2d.imax + div.title {
  max-width: calc(100% - 43px);
}

.version.v3d {
  background-image: url();
}

.version.v3d.imax {
  width: 43px;
  background-image: url();
}
</style>